<div id="description">This tests for a bug where adding content to the end of a fragment that ends with an interchange newline and inserting it would create an extraneous newline at the *start* of pasted content.  Below you should see two paragraphs of text followed by two empty paragraphs.</div>
<div id="edit" contentEditable="true"></div>

<script>
if (window.testRunner)
    testRunner.dumpAsText();
edit = document.getElementById("edit");
window.getSelection().collapse(edit, 0);
document.execCommand("InsertHTML", false, "<div>Paragraph one</div><div>Paragraph two</div><br class='Apple-interchange-newline'><div><br></div>");
if (window.testRunner)
    document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
</script>
